/**
 * This class holds the price and type for items
 * 
 * @author Matthew Edwards 
 * @version 3-5-11
 */

public class Item{
    
	/**
	 * This is the name of the item.
	 */
    private String name;
    
    /**
     * This is the price of the item. 
     */
    private Price price;
    
    /**
     * This creates an Item.
     * @param name the name of the item.
     * @param price the price of the item.
     */
    public Item(String name, Price price){
        this.name = name;
        this.price = price;
    }
    
    /**
     * Gets the name of the item
     *  
     * @return The item's name
     */ 
    public String getName(){
        return name;
    }
    
    /**
     * Sets the name
     * 
     * @param input the name of the Item.
     */
    public void setName(String input){
        name = input;
    }
    
    /**
     * Gets the price of the item.
     * 
     * @return the price of the item.
     */
    public Price getPrice(){
        return price;
    }
    
    /**
     * sets the price of the item
     * 
     * @param input the price of the Item
     */
    public void setPrice(Price input){
        price = input;
    }
    
    /**
     * returns the item as a string.
     * @return the item.
     */
    public String toString(){
    	return name + " : " + price.toString();
    }

}